home *** CD-ROM | disk | FTP | other *** search
- Path: news.islandnet.com!usenet
- From: Abram Hindle <abehind@islandnet.com>
- Newsgroups: comp.lang.c
- Subject: Newbie: How to put a byte to a000:0001 or more?
- Date: 30 Mar 1996 00:22:00 GMT
- Organization: Island Net in Victoria, B.C. Canada
- Message-ID: <4jhur8$995@sanjuan.islandnet.com>
- NNTP-Posting-Host: hornby.islandnet.com
-
- Ok I'm a newbie to C and to Assembler.
- I need help with finding out how in assembler or in c
- I can put (quickly) a byte in the a000:0000+ address to
- draw a pixel on the screen?
- I'm doing this on a IBM compatiable in VGA mode (13h)
- I've done something like so:
- void putpixel(int x, int y, char col)
- {
- unsigned int pos;
- pos=x+(y*319)
- asm {
-
- mov al,[col]/*al = colour*/
- mov ax,[pos]/*ax = position*/
- mov DI,ax /*move ax to di*/
- mov ax,[VGA]/*copies 0a000h to ax i've defined it*/
- mov es,ax /*moves that to es*/
- mov [ES:DI],al /*Put in Memory al(colour)*/
-
- }
- }
-
- and it does nothing! So could you guys help? I really need it,
- BGIs are to slow and so is using int 10h.
- e-mail me at: abehind@islandnet.com
-
-